package cn.duxiaod.demo.base.day210625;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

public class MainTest {
    public static void main(String[] args) {
        //System.out.println(method());
        int i = 0;
        for ( foo('A'); foo('B') && (i < 2); foo('C'))
        {
            i++ ;
            foo('D');
        }
    }

    static boolean foo(char c)
    {
        System.out.print(c);
        return true;
    }

    private static String method() {
        try{

            int a = 1/0;
            return "try";
        }catch (Exception e){
            System.out.println(e.getMessage());
            return "catch";
        }finally {
            System.out.println("finally");
            //finally在catch return前保留返回参数，所以不会改变
            return "f";
        }
    }
}
